package com.lemon.file.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lemon.common.core.annotation.Excel;
import com.lemon.common.core.serializer.JsonLongDeserializer;
import com.lemon.common.core.serializer.JsonLongSerializer;
import com.lemon.common.core.base.BaseEntity;

import java.io.Serializable;

/**
 * 包名称：com.lemon.file.domain
 * 类名称：BiFileInfo
 * 类描述：文件信息表
 * 创建人：@author huangpeng
 * 创建时间：2022年12月10日 16:47
 */
public class BiFileInfo extends BaseEntity implements Serializable {
    /**
    * 唯一id
    */
    @JsonSerialize(using = JsonLongSerializer.class)
    @JsonDeserialize(using = JsonLongDeserializer.class)
    private Long id;

    /**
    * 文件名
    */
    @Excel(name = "文件名")
    private String fileName;

    /**
    * 旧文件名
    */
    private String fileOldName;

    /**
    * 文件扩展名
    */
    private String fileExtName;

    /**
    * 文件大小
    */
    @Excel(name = "文件大小")
    private String fileSize;

    /**
    * 文件地址
    */
    @Excel(name = "文件地址")
    private String fileUrl;

    /**
    * 文件夹
    */
    private String folder;

    /**
    * 父文件夹
    */
    private String parentFolder;

    /**
    * 存储位置，minio, 阿里云OSS，七牛云
    */
    @Excel(name = "存储位置", dictType = "sys_file_storage_place")
    private String storagePlace;

    /**
    * 文件分类id
    */
    private String fileSortId;

    /**
    * 管理员id
    */
    private String adminId;

    /**
    * 用户id
    */
    private String userId;

    /**
    * 状态
    */
    private String status;

    @Excel(name = "文件夹")
    private String folderName;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileOldName() {
        return fileOldName;
    }

    public void setFileOldName(String fileOldName) {
        this.fileOldName = fileOldName;
    }

    public String getFileExtName() {
        return fileExtName;
    }

    public void setFileExtName(String fileExtName) {
        this.fileExtName = fileExtName;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public String getFolder() {
        return folder;
    }

    public void setFolder(String folder) {
        this.folder = folder;
    }

    public String getParentFolder() {
        return parentFolder;
    }

    public void setParentFolder(String parentFolder) {
        this.parentFolder = parentFolder;
    }

    public String getStoragePlace() {
        return storagePlace;
    }

    public void setStoragePlace(String storagePlace) {
        this.storagePlace = storagePlace;
    }

    public String getFileSortId() {
        return fileSortId;
    }

    public void setFileSortId(String fileSortId) {
        this.fileSortId = fileSortId;
    }

    public String getAdminId() {
        return adminId;
    }

    public void setAdminId(String adminId) {
        this.adminId = adminId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getFolderName() {
        return folderName;
    }

    public void setFolderName(String folderName) {
        this.folderName = folderName;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", fileName=").append(fileName);
        sb.append(", fileOldName=").append(fileOldName);
        sb.append(", fileExtName=").append(fileExtName);
        sb.append(", fileSize=").append(fileSize);
        sb.append(", fileUrl=").append(fileUrl);
        sb.append(", folder=").append(folder);
        sb.append(", parentFolder=").append(parentFolder);
        sb.append(", storagePlace=").append(storagePlace);
        sb.append(", fileSortId=").append(fileSortId);
        sb.append(", adminId=").append(adminId);
        sb.append(", userId=").append(userId);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }
}